package com.heiye.user.biz.enums;

import com.heiye.framework.common.exception.BaseExceptionInterface;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author: heiye
 * @date: 2024/11/18 下午19:11
 * @version: v1.0.0
 * @description: 全局异常处理
 */
@Getter
@AllArgsConstructor
public enum ResponseCodeEnum implements BaseExceptionInterface {

    // ----------- 通用异常状态码 -----------
    SYSTEM_ERROR("USER-10000", "出错啦，后台小哥正在努力修复中..."),
    PARAM_NOT_VALID("USER-10001", "参数错误"),

    // ----------- 业务异常状态码 -----------
    DISPLAY_NAME_VALID_FAIL("USER-20001", "昵称请设置2-24个字符，不能使用@《/等特殊字符"),
    SEX_VALID_FAIL("USER-20002", "性别错误"),
    SYNOPSIS_VALID_FAIL("USER-20003", "个人简介请设置1-100个字符"),
    UPLOAD_AVATAR_FAIL("USER-20004", "头像上传失败"),
    UPLOAD_BACKGROUND_IMG_FAIL("USER-20005", "背景图上传失败"),
    USER_NOT_FOUND("USER-20006", "该用户不存在"),
    USER_LANGUAGE_INT_FAIL("USER-20007", "语言信息设置失败"),
    USER_LANGUAGE_NOT_FOUND("USER-20008", "用户语言信息不存在"),
    REGISTER_TYPE_ERROR("USER-20009", "注册类型错误"),
    CANT_UPDATE_OTHER_USER_PROFILE("USER-20010", "无权限修改他人用户信息"),
    ;

    // 异常码
    private final String errorCode;
    // 错误信息
    private final String errorMessage;
}
